<?php
require_once'funzioni.php';

if (isset($_GET['lang']))
{
	if($_GET['lang']=='it' || $_GET['lang']=='en')
	{
		$lang=$_GET['lang'];
	}
	else{
		$lang='it';
		}
}
else
{
		$lang='it';
}

if (isset($_GET['id']))
{
	if((int)$_GET['id'])
	{
		$id=(int)$_GET['id'];
	}
	
	else
	{
	echo'errore';
	}
}

if(isset($id) && isset($lang))
{
	$page=getPage($id, $lang);
}

include 'views/header.php';
include 'views/renderPage.php';
include 'views/footer.php';
?>